/**
 * @License: (C) Copyright 2013-2022
 * @Contact: abcque@outlook.com
 * @IDE: IntelliJ IDEA
 * @Encoding: utf-8
 * @Project: st2212 2213
 * @Package: PACKAGE_NAME
 * @File: MultiplyTable.java
 * @Time: 2022/12/6 8:18
 * @Author: abcque
 * @Description: 九九乘法表
 * @Modifier:
 * @ModifyDate:
 * @ModifyRemark:
 */
public class MultiplyTable {
    public static void main(String[] args) {
        // System.out.println("1 * 1 = 1");
        int i = 9;
        // int j = 1;
        // System.out.println(i + " * " + j + " = " + i * j);
        // System.out.printf("%d * %d = %d", i, j, i * j);

        // System.out.printf("%d * %d = %d", j, i, i * j);
        /*for (int k = 1; k < 10; k++) {
            // System.out.printf("%d ", k);
            System.out.printf("%d * %d = %d ", k, i, i * k);
        }*/

        // for (int j = 1; j < 10; j ++) {
        //     // System.out.printf("%d ", k);
        //     System.out.printf("%d * %d = %d ", j, i, i * j);
        // }

        // for (int k = 1; k < 10; k++) {
        //     for (int j = 1; j <= k; j ++) {
        //         // System.out.printf("%d ", k);
        //         System.out.printf("%d * %d = %-2d ", j, k, k * j);
        //     }
        //     System.out.printf("%c", '\n');
        // }

        for (int k = 1; k < 10; k++) {
            for (int j = k; j <= 9; j ++) {
                // System.out.printf("%d ", k);
                System.out.printf("%d * %d = %-2d ", j, k, k * j);
            }
            System.out.printf("%c", '\n');
        }
    }
}
